/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package salttourney;

import java.util.ArrayList;
import java.util.Date;

/**
 *
 * @author Jake
 */
public class League {
    private ArrayList tournaments;
    private ArrayList players;
    private Date startDate;
    private Date endDate;
    private String name;
    int ID;
    
    public League() {
        startDate = new Date();
        endDate = new Date();
        tournaments = new ArrayList();
        players = new ArrayList();
        ID = hashCode();
    }
    
    public void addTournament() {
        Tournament t = new Tournament();
        addTournament(t);
    }
    
    public void addTournament(Tournament t) {
        tournaments.add(t);
    }
    
    public ArrayList getTournaments() {
        return tournaments;
    }
    
    public void addPlayer(Player p) {
        players.add(p);
    }
    
    public void setStartDate(Date d) {
        this.startDate=d;
    }
    
    public void setEndDate(Date d) {
        this.endDate=d;
    }
    
    public Date getStartDate() {
        return this.startDate;
    }
    
    public Date getEndDate(){
        return this.endDate;
    }
    
    public void setName(String name) {
        this.name=name;
    }
    
    public String getName() {
        return this.name;
    }
    
    public int getID() {
        return ID;
    }
}
